package com.itheima.before_leyou_store.controller;

import com.itheima.before_leyou_store.pojo.Sku;
import com.itheima.before_leyou_store.service.SkuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class test {
    @Autowired
    private SkuService skuService;
    @GetMapping("/findById/{id}")
    public Sku findById(@PathVariable("id")String id){
        Sku sku = skuService.findById(id);
        return sku;
    }


}
